import express from 'express';
import { Controller } from './controller';
import { authorizeHandleAdmin, authorizeHandleNormal } from 'server/api/middlewares/authorize';

// 定义路由，使用鉴权中间件
export default express
    .Router()
    .get('/get', authorizeHandleNormal, Controller.get)
    .post('/add', authorizeHandleAdmin, Controller.add)
    .post('/update', authorizeHandleAdmin, Controller.update);